<template>
  <el-date-picker
    v-bind="item"
    :type="item.dateType || 'date'"
    :value-format="item['value-format'] || item.valueFormat || 'YYYY-MM-DD'"
    :placeholder="item.placeholder || '请选择' + item.label"
    :start-placeholder="item['start-placeholder'] || item.startPlaceholder || '请选择开始日期'"
    :end-placeholder="item['end-placeholder'] || item.endPlaceholder || '请选择结束日期'"
    :range-separator="item['range-separator'] || item.rangeSeparator || '至'"
    v-model="model[item.prop]"
    v-on="item.events || {}"
    :clearable="item.clearable === false ? false : true"
    :editable="item.editable || false"
  ></el-date-picker>
</template>

<script setup>
const props = defineProps({
  item: Object,
  model: Object
})
</script>
